<?php
require_once('modules/edanz_Feedback/SugarWidgets/SugarWidgetSubPanelTopButtonConstructFeedback.php');
require_once('modules/edanz_Flags/SugarWidgets/SugarWidgetSubPanelTopCreateFlagButton.php');
$layout_defs['edanz_Deliverables']['subpanel_setup'] = array(
//		'flags' => array(
//                        'order' => 100,
//                        'module' => 'edanz_Flags',
//                        'get_subpanel_data' => 'flags',
//                        'sort_order' => 'desc',
//                        'sort_by' => 'date_entered',
//                        'subpanel_name' => 'default',
//                        'title_key' => 'LBL_FLAGS_SUBPANEL_TITLE',
//                        'top_buttons' => array(
//							array('widget_class' => 'SubPanelTopButtonQuickCreate'),
//							array('widget_class' => 'SubPanelTopSelectButton'),
//			//array('widget_class' => 'SubPanelTopSelectButton'),
//                        ),
//        ),

		'tasks' => array(
                        'order' => 600,
                        'module' => 'Tasks',
                        'get_subpanel_data' => 'tasks',
                        'sort_order' => 'desc',
                        'sort_by' => 'date_start',
                        'subpanel_name' => 'ForDeliverables',
                        'title_key' => 'LBL_TASKS_SUBPANEL_TITLE',
                        'top_buttons' => array(
 //                       array('widget_class' => 'SubPanelTopButtonQuickCreate'),
//						array('widget_class' => 'SubPanelTopSelectButton'),
                        ),
	        ),

        'feedback' => array(
                'order' => 700,
                'module' => 'edanz_Feedback',
                'get_subpanel_data' => 'feedback',
                'sort_order' => 'desc',
                'sort_by' => 'date_entered',
                'subpanel_name' => 'default',
                'title_key' => 'LBL_FEEDBACK_SUBPANEL_TITLE',
                'top_buttons' => array(
                	array('widget_class' => 'SubPanelTopButtonConstructFeedback'),
					array('widget_class' => 'SubPanelTopSelectButton'),
                ),
        ),
);
global $beanList;
if (isset($beanList['SecurityGroups'])) {
	$layout_defs["edanz_Deliverables"]["subpanel_setup"]["securitygroups_edanz_deliverables"] = array (
		'order' => 999,
  		'module' => 'SecurityGroups',
  		'subpanel_name' => 'default',
  		'sort_order' => 'asc',
  		'sort_by' => 'id',
  		'title_key' => 'LBL_SECURITYGROUPS_SUBPANEL_TITLE',
  		'get_subpanel_data' => 'securitygroups_edanz_deliverables',
  		'top_buttons' => 
  		array (
					array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'SecurityGroups', 'mode' => 'MultiSelect'),
//  					'mode' => 'MultiSelect',
  		),
	);
}
	
	$layout_defs['edanz_Deliverables']['subpanel_setup']['edanz_deliverables_edanz_fees'] = array(
	'order' => 300,
	'sort_order' => 'desc',
	'sort_by' => 'id',
	'title_key' => 'LBL_FEES_SUBPANEL_TITLE',
	'type' => 'collection',
	'subpanel_name' => 'default',   //this values is not associated with a physical file.
	'module'=>'edanz_Fees',
	'collection_list' => array(	
		'flags' => array(
			'module' => 'edanz_Fees',
			'subpanel_name' => 'ForDeliverable',
			'get_subpanel_data' => 'function:get_fees_query',
			'generate_select'=>true,
			'function_parameters' => array(
				'return_as_array'=>'true',
				'import_function_file' => 'modules/edanz_Deliverables/SiblingSubpanel.php',
				'deliverable_id' => $_REQUEST['record'],
			),
		),	
	 ),
);
	$layout_defs["edanz_Deliverables"]["subpanel_setup"]["edanz_deliverables_edanz_authorpreferences"] = array (
		'order' => 200,
  		'module' => 'edanz_Authorpreferences',
  		'subpanel_name' => 'default',
  		'sort_order' => 'asc',
  		'sort_by' => 'id',
  		'title_key' => 'LBL_AUTHORPREFERENCES_SUBPANEL_TITLE',
  		'get_subpanel_data' => 'edanz_deliverables_edanz_authorpreferences',
		'top_buttons' => 
  		array (
					array('widget_class' => 'SubPanelTopButtonQuickCreate'),
					array('widget_class' => 'SubPanelTopSelectButton',
					'popup_module' => 'edanz_Deliverables',
					'mode' => 'MultiSelect',
				),
  		),
	);
	$layout_defs["edanz_Deliverables"]["subpanel_setup"]["edanz_deliverables_edanz_communications"] = array (
		'order' => 100,
  		'module' => 'edanz_Communications',
  		'subpanel_name' => 'default',
  		'sort_order' => 'asc',
  		'sort_by' => 'id',
  		'title_key' => 'LBL_EDANZ_COMMUNICATIONS_SUBPANEL_TITLE',
  		'get_subpanel_data' => 'edanz_deliverables_edanz_communications',
  		'top_buttons' => 
  		array (
					array('widget_class' => 'SubPanelTopButtonQuickCreate'),
					array('widget_class' => 'SubPanelTopSelectButton',
						  'popup_module' => 'edanz_Deliverables',
						  'mode' => 'MultiSelect',
					),
  		),
	);
	$layout_defs["edanz_Deliverables"]["subpanel_setup"]["edanz_deliverables_edanz_documents"] = array (
		'order' => 400,
  		'module' => 'Documents',
  		'subpanel_name' => 'default',
  		'sort_order' => 'asc',
  		'sort_by' => 'id',
  		'title_key' => 'LBL_DOCUMENTS_SUBPANEL_TITLE',
  		'widget_class' => 'SubPanelTopButtonQuickCreate',
  		'get_subpanel_data' => 'edanz_deliverables_edanz_documents',
  		'top_buttons' => 
  		array (
					array('widget_class' => 'SubPanelTopButtonQuickCreate'),
					array('widget_class' => 'SubPanelTopSelectButton',
						  'popup_module' => 'edanz_Deliverables',
						  'mode' => 'MultiSelect',
					),
  		),
	);
	$layout_defs["edanz_Deliverables"]["subpanel_setup"]["edanz_deliverables_edanz_flags"] = array (
		'order' => 500,
  		'module' => 'edanz_Flags',
  		'subpanel_name' => 'ForDeliverable',
  		'sort_order' => 'asc',
  		'sort_by' => 'id',
  		'title_key' => 'LBL_FLAG_SUBPANEL_TITLE',
  		'get_subpanel_data' => 'edanz_deliverables_edanz_flags',
  		'top_buttons' => 
  		array (
					array('widget_class' => 'SubPanelTopButtonQuickCreate'),
					array('widget_class' => 'SubPanelTopSelectButton',
						  'mode' => 'MultiSelect',
					),
  		),
	);
?>
